import 'package:backend.core/core/domain/entities/api/app_store/api_app_store_purchased_subscription_price_increase_status.dart';
import 'package:backend.core/core/domain/entities/app_store/app_store_purchased_subscription_price_increase_status.dart';

abstract class CreateApiAppStorePurchasedSubscriptionPriceIncreaseStatusFromInternalOne {
  ApiAppStorePurchasedSubscriptionPriceIncreaseStatus call({
    required AppStorePurchasedSubscriptionPriceIncreaseStatus priceIncreaseStatus,
  });
}

class CreateApiAppStorePurchasedSubscriptionPriceIncreaseStatusFromInternalOneImpl
    implements CreateApiAppStorePurchasedSubscriptionPriceIncreaseStatusFromInternalOne {
  const CreateApiAppStorePurchasedSubscriptionPriceIncreaseStatusFromInternalOneImpl();

  @override
  ApiAppStorePurchasedSubscriptionPriceIncreaseStatus call({
    required AppStorePurchasedSubscriptionPriceIncreaseStatus priceIncreaseStatus,
  }) {
    switch (priceIncreaseStatus) {
      case AppStorePurchasedSubscriptionPriceIncreaseStatus.absent:
        return ApiAppStorePurchasedSubscriptionPriceIncreaseStatus.absent;
      case AppStorePurchasedSubscriptionPriceIncreaseStatus.accepted:
        return ApiAppStorePurchasedSubscriptionPriceIncreaseStatus.accepted;
      case AppStorePurchasedSubscriptionPriceIncreaseStatus.pending:
        return ApiAppStorePurchasedSubscriptionPriceIncreaseStatus.pending;
    }
  }
}
